package com.loby.data.mapper;

import com.loby.data.base.pojo.RtMonStationPollutant;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MonitorStationPollutantMapper {
  @Select("select * from rt_mon_station_pollutant where fk_monitor_id =#{id}")
  List<RtMonStationPollutant> getPollutantByMonStationId(@Param("id") long id);

@Insert("insert into rt_mon_station_pollutant VALUES (" +
        "#{pkExcessId},#{fkMonitorId},#{fkPollutantCode},#{rangeUpper},#{rangeLower},#{isRangeAlarm}" +
        ",#{overStandardUpper},#{overStandardLower},#{fkDitRealDataAlarmModeNo},#{fkDitMinDataAlarmModeNo}" +
        ",#{fkDitHourDataAlarmModeNo},#{fkDitDayDataAlarmModeNo},#{fkDitRealDataAlarmTimeModeNo},#{fkDitMinDataAlarmTimeModeNo}" +
        ",#{fkDitHourDataAlarmTimeModeNo},#{fkDitDayDataAlarmTimeModeNo},#{realAlarmInterval},#{minAlarmInterval}" +
        ",#{hourAlarmInterval},#{realDataConstantAlarmAmount},#{minDataConstantAlarmAmount},#{hourDataConstantAlarmAmount}" +
        ",#{realDataZerosAlarmAmount},#{minDataZerosAlarmAmount},#{hourDataZerosAlarmAmount},#{realStaticAlarmTime},#{minStaticAlarmTime}" +
        ",#{hourStaticAlarmTime},#{dayStaticAlarmTime})")
 int insertRtStationPollutants(RtMonStationPollutant pollutants);



}
